package com.zzs.library.nosql.elasticsearch.document;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @Author ZechariahZheng
 * @Date 2020/1/6 17:14
 * @Version 1.0
 * @description
 */
@Document(indexName = "library", type = "book", shards = 1, replicas = 0)
public class EsBook implements Serializable {
    private static final long serivalVersionUID = -1L;

    @Id
    private Long id;
    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String name;
    @Field(type = FieldType.Keyword)
    private String auth;
    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String brief;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuth() {
        return auth;
    }

    public void setAuth(String auth) {
        this.auth = auth;
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }

}
